package com.aijk.commons.dict;

import com.aijk.commons.dao.DictMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * 默认字典实现类，需要在spring的XML配置文件中加载
 * Created by iscdw on 2016/4/12.
 */
public class DefaultLoadDictService implements LoadDictService {

    @Autowired
    private DictMapper dictMapper;

    @Override
    public List<Dict> load() {
        return dictMapper.selectList();
    }

    @Override
    public List<Dict> getDictList(String cid) {
        return dictMapper.selectByCid(cid);
    }
}
